package com.cn.utils;

import com.cn.pojo.ParameterMapping;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: ParameterMappingTokenHandler
 * @Description: TODO
 * @author: PENG GANG
 * @Date: 2021-04-07 17:06
 * @Version: 1.0
 **/
public class ParameterMappingTokenHandler implements TokenHandler {
    private List<ParameterMapping> parameterMappings = new ArrayList();

    public List<ParameterMapping> getParameterMappings() {
        return this.parameterMappings;
    }

    public void setParameterMappings(List<ParameterMapping> parameterMappings) {
        this.parameterMappings = parameterMappings;
    }

    public String handleToken(String content) {
        this.parameterMappings.add(this.buildParameterMapping(content));
        return "?";
    }

    private ParameterMapping buildParameterMapping(String content) {
       ParameterMapping parameterMapping = new ParameterMapping(content);
       return parameterMapping;
    }

}
